#color 
warn_c="\033[31;1m"
info_c="\033[32;1m"
err_c="\033[41;37;5m"

timestamp=`date "+%s"`

#http
httpurl="http://e.beidousat.com:5600"

function printf_c() {
    if [[ $2 == "" ]];then
        color=$info_c
    else
        color=$2
    fi
    echo  -e "$color $1 \033[0m"
}

function printf_v() {
    local date1=$(date +%F)
    echo "=========================$version $date1========================"
}

function http_download() {
        local src_fn=$1
        local dest_fn=$2
        curl "$httpurl$src_fn" -o $dest_fn >>/dev/null && \
        echo 0 || echo 1
}
